class CreateOrders < ActiveRecord::Migration
  def self.up
    create_table :orders do |t|
      t.references :user
      t.references :address
      t.integer    :paytype,:limit=>2
      t.datetime   :pay_time
      t.string     :remark
      t.string     :logistics_type,:limit=>20
      t.integer    :logistics_fee,:precision => 8, :scale => 2, :default => 0
      t.string     :logistics_order_no
      t.integer    :status,:limit=>2
      t.integer    :confirmor
      t.integer    :ship_by
      t.string     :shipping_remark
      t.integer    :payee
      t.string     :pay_remark
      t.timestamps
    end
  end

  def self.down
    drop_table :orders
  end
end
